package com.baidu.carlife.sdk.internal.protocol

import com.baidu.carlife.sdk.util.annotations.DoNotStrip

@DoNotStrip
object ServiceTypes {
    /**
     * CarLife控制消息版本号
     */
    const val MSG_CMD_PROTOCOL_VERSION = 1001
    const val PROTOCOL_VERSION_MAJOR_VERSION_1 = 1
    const val PROTOCOL_VERSION_MAJOR_VERSION_2 = 2
    const val PROTOCOL_VERSION_MAJOR_VERSION_3 = 3
    const val PROTOCOL_VERSION_MAJOR_VERSION_4 = 4
    const val PROTOCOL_VERSION_MINOR_VERSION = 1
    const val PROTOCOL_VERSION_MATCH = 1
    const val PROTOCOL_VERSION_NOT_MATCH = 2

    /**
     * 手机和车机之间相互传递的控制消息
     */
    // 写日志到文件的消息
    const val MSG_CMD_HU_LOG = 0x7FFF0001

    // 激活 转换盒发送
    const val MSG_CMD_BOX_ACTIVE = 0x00016001
    // 激活 激活端发送
    const val MSG_CMD_HU_ACTIVE = 0x00016002

    // 初始化时交互的信息
    const val MSG_CMD_HU_PROTOCOL_VERSION = 0x00018001
    const val MSG_CMD_PROTOCOL_VERSION_MATCH_STATUS = 0x00010002
    const val MSG_CMD_HU_INFO = 0x00018003
    const val MSG_CMD_MD_INFO = 0x00010004
    const val MSG_CMD_HU_BT_OOB_INFO = 0x00018005
    const val MSG_CMD_MD_BT_OOB_INFO = 0x00010006

    // 时间同步
    const val MSG_CMD_TIME_SYNC = 0x00010060

    // 请求后视镜版本
    const val MSG_CMD_ASR_VERSION_MATCH = 0x00010062

    // 设备版本信息
    const val MSG_CMD_DEVICE_VERSION_INFO = 0x00010068

    // Data通道相关消息
    const val MSG_SEND_START = 0x00070001
    const val MSG_SENDING_DATA = 0x00070002
    const val MSG_SEND_FINISH = 0x00070003
    const val MSG_SEND_STOP = 0x00070004
    const val MSG_STOP_RECEIVE = 0x00070005

    // 视频相关消息
    const val MSG_CMD_VIDEO_ENCODER_INIT = 0x00018007
    const val MSG_CMD_VIDEO_ENCODER_INIT_DONE = 0x00010008
    const val MSG_CMD_VIDEO_ENCODER_START = 0x00018009
    const val MSG_CMD_VIDEO_ENCODER_PAUSE = 0x0001800A
    const val MSG_CMD_VIDEO_ENCODER_RESET = 0x0001800B
    const val MSG_CMD_VIDEO_ENCODER_FRAME_RATE_CHANGE = 0x0001800C
    const val MSG_CMD_VIDEO_ENCODER_FRAME_RATE_CHANGE_DONE = 0x0001000D
    const val MSG_CMD_MD_VIDEO_ENCODER_REQ = 0x0001000F

    // 音频相关消息
    const val MSG_CMD_PAUSE_MEDIA = 0x0001800E

    // 车载数据消息订阅机制
    const val MSG_CMD_CAR_DATA_SUBSCRIBE_REQ = 0x00010031
    const val MSG_CMD_CAR_DATA_SUBSCRIBE_RSP = 0x00018032
    const val MSG_CMD_CAR_DATA_START_REQ = 0x00010033
    const val MSG_CMD_CAR_DATA_STOP_REQ = 0x00010034

    // 车载信息
    const val MSG_CMD_CAR_VELOCITY = 0x0001800F
    const val MSG_CMD_CAR_GPS = 0x00018010
    const val MSG_CMD_CAR_GYROSCOPE = 0x00018011
    const val MSG_CMD_CAR_ACCELERATION = 0x00018012
    const val MSG_CMD_CAR_OIL = 0x00018013
    // 广汽定制需求:档位状态
    const val MSG_CMD_CAR_GEAR = 0x00018029
    // 空挡
    const val GEAR_NEUTRAL = 1
    // 驻车档
    const val GEAR_PARK = 2
    // 动力档
    const val GEAR_DRIVE = 3
    // 低速挡
    const val GEAR_LOW = 4
    // 倒车档
    const val GEAR_REVERSE = 5

    // 电话状态
    const val MSG_CMD_TEL_STATE_CHANGE_INCOMING = 0x00010014
    const val MSG_CMD_TEL_STATE_CHANGE_OUTGOING = 0x00010015
    const val MSG_CMD_TEL_STATE_CHANGE_IDLE = 0x00010016
    const val MSG_CMD_TEL_STATE_CHANGE_INCALLING = 0x00010017

    // 移动设备端状态
    const val MSG_CMD_SCREEN_ON = 0x00010018
    const val MSG_CMD_SCREEN_OFF = 0x00010019
    const val MSG_CMD_SCREEN_USER_PRESENT = 0x0001001A
    const val MSG_CMD_FOREGROUND = 0x0001001B
    const val MSG_CMD_BACKGROUND = 0x0001001C

    // 启动模式
    const val MSG_CMD_LAUNCH_MODE_NORMAL = 0x0001801D
    const val MSG_CMD_LAUNCH_MODE_PHONE = 0x0001801E
    const val MSG_CMD_LAUNCH_MODE_MAP = 0x0001801F
    const val MSG_CMD_LAUNCH_MODE_MUSIC = 0x00018020
    const val MSG_CMD_GO_TO_DESKTOP = 0x00010021

    // 权限相关
    const val MSG_PERMISSION_VERSION_UPDATE = 0x00010029
    const val MSG_PERMISSION_READ_WRITE = 0x0001002B
    const val MSG_PERMISSION_RECORD = 0x0001002C
    const val MSG_PERMISSION_LOCATION = 0x0001002D
    const val MSG_READ_MEDIA = 0x0001003A

    // 语音相关
    const val MSG_CMD_MIC_RECORD_WAKEUP_START = 0x00010022
    const val MSG_CMD_MIC_RECORD_END = 0x00010023
    const val MSG_CMD_MIC_RECORD_RECOG_START = 0x00010024

    // 播放水滴声相关
    const val MSG_CMD_MIC_RECORD_PREPARE_START = 0x00010071
    const val MSG_CMD_MIC_RECORD_PREPARE_DONE = 0x00018072

    const val MSG_CMD_GO_TO_FOREGROUND = 0x00018025
    const val MSG_CMD_MODULE_STATUS = 0x00010026
    const val MSG_CMD_STATISTIC_INFO = 0x00018027
    const val MSG_CMD_MODULE_CONTROL = 0x00018028

    // 音乐相关
    const val MSG_CMD_MEDIA_INFO = 0x00010035
    const val MSG_CMD_MEDIA_PROGRESS_BAR = 0x00010036

    const val MSG_CMD_CONNECT_EXCEPTION = 0x00010037
    const val MSG_CMD_REQUEST_GO_TO_FOREGROUND = 0x00010038

    // 点击反馈发消息到车机
    const val MSG_CMD_UI_ACTION_SOUND = 0x00010039

    // 蓝牙电话相关的命令消息
    const val MSG_CMD_BT_HFP_REQUEST = 0x00010040
    const val MSG_CMD_BT_HFP_INDICATION = 0x00018041
    const val MSG_CMD_BT_HFP_CONNECTION = 0x00018042

    // 车机端订阅手机端信息的消息
    const val MSG_CMD_MD_CARLIFE_DATA_REQ = 0x00010043
    const val MSG_CMD_CARLIFE_DATA_SUBSCRIBE = 0x00018043
    const val MSG_CMD_CARLIFE_DATA_SUBSCRIBE_DONE = 0x00010044
    const val MSG_CMD_HU_CARLIFE_DATA_SUBSCRIBE_DONE_RESPONSE = 0x00018044
    const val MSG_CMD_CARLIFE_DATA_SUBSCRIBE_START = 0x00018045
    const val MSG_CMD_CARLIFE_DATA_SUBSCRIBE_STOP = 0x00018046
    const val MSG_CMD_NAV_ASSISTANT_GUIDE_INFO = 0x00018047
    const val MSG_CMD_NAV_NEXT_TURN_INFO = 0x00010030


    // 车机对手机进行安全认证
    const val MSG_CMD_HU_AUTH_REQUEST = 0x00018048
    const val MSG_CMD_MD_AUTH_RESPONSE = 0x00010049
    const val MSG_CMD_HU_AUTH_RESULT = 0x0001804A
    const val MSG_CMD_MD_AUTH_RESULT = 0x0001004B
    const val MSG_CMD_MD_AUTH_RESULT_RESPONSE = 0x0001804C

    const val MSG_CMD_START_BT_AUTO_PAIR_REQUEST = 0x0001004D
    const val MSG_CMD_BT_HFP_RESPONSE = 0x0001804E
    const val MSG_CMD_BT_HFP_STATUS_REQUEST = 0x0001004F
    const val MSG_CMD_BT_HFP_STATUS_RESPONSE = 0x00018050

    // 功能定制相关的命令消息
    const val MSG_CMD_MD_FEATURE_CONFIG_REQUEST = 0x00010051
    const val MSG_CMD_HU_FEATURE_CONFIG_RESPONSE = 0x00018052

    const val MSG_CMD_BT_START_IDENTIFY_REQ = 0x00018053
    const val MSG_CMD_BT_IDENTIFY_RESULT_IND = 0x00010054

    // 错误码统计信息
    const val MSG_CMD_ERROR_CODE = 0x00018055

    const val MSG_CMD_VIDEO_ENCODER_JPEG = 0x00018056
    const val MSG_CMD_VIDEO_ENCODER_JPEG_ACK = 0x00010057

    const val MSG_CMD_BT_HFP_CALL_STATUS_COVER = 0x00010058

    const val MSG_CMD_MD_EXIT = 0x00010059

    // 连接统计项,先在WINCE车机上实现
    const val MSG_CMD_HU_CONNECT_STATISTIC = 0x00018060
    const val MSG_CMD_HU_VOICE_CONTROL = 0x00010066

    // 数据加密相关
    const val MSG_CMD_MD_RSA_PUBLIC_KEY_REQUEST = 0x0001006A
    const val MSG_CMD_HU_RSA_PUBLIC_KEY_RESPONSE = 0x0001806B
    const val MSG_CMD_MD_AES_KEY_SEND_REQUEST = 0x0001006C
    const val MSG_CMD_HU_AES_REC_RESPONSE = 0x0001806D
    const val MSG_CMD_MD_ENCRYPT_READY = 0x0001006E
    const val MSG_CMD_MD_ENCRYPT_READY_DONE = 0x0001806F

    // 车控相关
    const val MSG_CMD_VEHICLE_CONTROL_INFO = 0x00018061
    const val MSG_CMD_VEHICLE_CONTROL = 0x0001006F
    const val MSG_VEHICLE_CONTROL_TYPE_GET = 0x0001
    const val MSG_VEHICLE_CONTROL_TYPE_POST = 0x0002
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_STRING = 0x00100000
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_BOOLEAN = 0x00200000
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_INT32 = 0x00400000
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_INT64 = 0x00500000
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_FLOAT = 0x00600000
    const val MSG_VEHICLE_CONTROL_VALUE_TYPE_BYTES = 0x00700000
    const val MSG_VEHICLE_CONTROL_ID_GET_ALL_STATUS = 0x0001
    const val MSG_VEHICLE_CONTROL_ID_GET_BASE_STATUS = 0x0002
    const val MSG_VEHICLE_CONTROL_ID_GET_HVAC_STATUS = 0x0003
    const val MSG_VEHICLE_CONTROL_ID_GET_MIRROR_STATUS = 0x0004
    const val MSG_VEHICLE_CONTROL_ID_GET_SEAT_STATUS = 0x0005
    const val MSG_VEHICLE_CONTROL_ID_GET_WINDOW_STATUS = 0x0006

    const val MSG_VEHICLE_CONTROL_GET_ALL_STATUS = 0x0001
    const val MSG_VEHICLE_CONTROL_GET_BASE_STATUS = 0x0002
    const val MSG_VEHICLE_CONTROL_GET_HVAC_STATUS = 0x0003
    const val MSG_VEHICLE_CONTROL_GET_MIRROR_STATUS = 0x0004
    const val MSG_VEHICLE_CONTROL_GET_SEAT_STATUS = 0x0005
    const val MSG_VEHICLE_CONTROL_GET_WINDOW_STATUS = 0x0006

    const val MSG_VEHICLE_CONTROL_ID_WINDOW_MOVE = 0x0BC1
    const val MSG_VEHICLE_CONTROL_ID_WINDOW_POS = 0x0BC0
    const val MSG_VEHICLE_CONTROL_ID_HVAC_POWER_ON = 0x0510
    const val MSG_VEHICLE_CONTROL_ID_HVAC_TEMPERATURE_SET = 0x0503
    const val MSG_VEHICLE_CONTROL_ID_HVAC_WIND_SET = 0x0504
    const val MSG_VEHICLE_CONTROL_ID_HVAC_WIND_TYPE_SET = 0x0505
    const val MSG_VEHICLE_CONTROL_ID_SEAT_FORE_AFT_MOVE = 0x0B86
    const val MSG_VEHICLE_CONTROL_ID_SEAT_BACKREST_ANGLE_MOVE = 0x0B88
    const val MSG_VEHICLE_CONTROL_ID_MIRROR_ON = 0x0B46
    const val MSG_VEHICLE_CONTROL_ID_MIRROR_Y_POS = 0x0B42
    const val MSG_VEHICLE_CONTROL_ID_MIRROR_Y_MOVE = 0x0B43
    const val MSG_VEHICLE_CONTROL_ID_MIRROR_Z_POS = 0x0B40
    const val MSG_VEHICLE_CONTROL_ID_MIRROR_Z_MOVE = 0x0B41

    const val MSG_VEHICLE_CONTROL_AREA_ID_GLOBAL = 0x01000000
    const val MSG_VEHICLE_CONTROL_AREA_ID_ZONE = 0x02000000
    const val MSG_VEHICLE_CONTROL_AREA_ID_WINDOW = 0x03000000
    const val MSG_VEHICLE_CONTROL_AREA_ID_MIRROR = 0x04000000
    const val MSG_VEHICLE_CONTROL_AREA_ID_SEAT = 0x05000000
    const val MSG_VEHICLE_CONTROL_AREA_ID_DOOR = 0x06000000

    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_FRONT_WINDSHIELD = 0x0001
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_REAR_WINDSHIELD = 0x0002
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROOF_TOP = 0x0004
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_1_LEFT = 0x0010
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_1_RIGHT = 0x0020
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_2_LEFT = 0x0100
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_2_RIGHT = 0x0200
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_3_LEFT = 0x1000
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ROW_3_RIGHT = 0x2000
    const val MSG_VEHICLE_CONTROL_AREA_WINDOW_ALL = 0x3000

    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_1_LEFT = 0x0001
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_1_CENTER = 0x0002
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_1_RIGHT = 0x0004
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_2_LEFT = 0x0010
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_2_CENTER = 0x0020
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_2_RIGHT = 0x0040
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_3_LEFT = 0x0100
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_3_CENTER = 0x0200
    const val MSG_VEHICLE_CONTROL_AREA_SEAT_ROW_3_RIGHT = 0x0400

    const val MSG_VEHICLE_CONTROL_AREA_MIRROR_DRIVER_LEFT = 0x00000001
    const val MSG_VEHICLE_CONTROL_AREA_MIRROR_DRIVER_RIGHT = 0x00000002
    const val MSG_VEHICLE_CONTROL_AREA_MIRROR_DRIVER_CENTER = 0x00000004


    const val MSG_VEHICLE_CONTROL_INFO_SUPPORT_ENABLE = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_SUPPORT_DISABLE = 0x0002

    const val MSG_VEHICLE_CONTROL_INFO_BASE_POWER_STATUS = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_BASE_DRIVE_STATUS = 0x0002
    const val MSG_VEHICLE_CONTROL_INFO_BASE_SPEED_TYPE = 0x0003
    const val MSG_VEHICLE_CONTROL_INFO_BASE_SPEED_VALUE = 0x0004

    const val MSG_VEHICLE_CONTROL_INFO_HVAC_POWER_STATUS = 0x0005
    const val MSG_VEHICLE_CONTROL_INFO_HVAC_TEMPERATURE_TYPE = 0x0006
    const val MSG_VEHICLE_CONTROL_INFO_HVAC_TEMPERATURE_VALUE = 0x0007
    const val MSG_VEHICLE_CONTROL_INFO_HVAC_WIND_TYPE = 0x0008
    const val MSG_VEHICLE_CONTROL_INFO_HVAC_WIND_MAX_LEVEL = 0x0009
    const val MSG_VEHICLE_CONTROL_INFO_HVAC_WIND_SPEED = 0x000A

    const val MSG_VEHICLE_CONTROL_INFO_MIRROR_STATUS = 0x000B

    const val MSG_VEHICLE_CONTROL_INFO_VALUE_TYPE_STRING = 0x00100000
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_TYPE_INT32 = 0x00200000
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_TYPE_INT64 = 0x00300000
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_TYPE_FLOAT = 0x00400000

    const val MSG_VEHICLE_CONTROL_INFO_VALUE_ON = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_OFF = 0x0002

    const val MSG_VEHICLE_CONTROL_INFO_VALUE_KMH = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_MPH = 0x0002

    const val MSG_VEHICLE_CONTROL_INFO_VALUE_CENTIGRADE = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_FAHRENHEIT = 0x0002

    const val MSG_VEHICLE_CONTROL_INFO_VALUE_AUTO = 0x0001
    const val MSG_VEHICLE_CONTROL_INFO_VALUE_MANUAL = 0x0002

    // Video通道相关消息
    const val MSG_VIDEO_DATA = 0x00020001 // 在RecordUtil中直接使用值，修改时请手动同步过去

    const val MSG_VIDEO_HEARTBEAT = 0x00020002 // 在RecordUtil中直接使用值，修改时请手动同步过去


    // Media通道相关消息
    const val MSG_MEDIA_INIT = 0x00030001
    const val MSG_MEDIA_STOP = 0x00030002
    const val MSG_MEDIA_PAUSE = 0x00030003
    const val MSG_MEDIA_RESUME_PLAY = 0x00030004
    const val MSG_MEDIA_SEEK_TO = 0x00030005
    const val MSG_MEDIA_DATA = 0x00030006
    // aac编码后的音频文件
    const val MSG_MEDIA_DATA_ENCODER = 0x00030007

    // TTS通道相关消息
    const val MSG_NAV_TTS_INIT = 0x00040001
    const val MSG_NAV_TTS_END = 0x00040002
    const val MSG_NAV_TTS_DATA = 0x00040003
    const val MSG_NAV_TTS_DATA_ENCODE = 0x00040004

    // VR通道相关消息
    const val MSG_VR_DATA = 0x00058001
    const val MSG_VR_AUDIO_INIT = 0x00050002
    const val MSG_VR_AUDIO_DATA = 0x00050003
    const val MSG_VR_AUDIO_STOP = 0x00050004
    const val MSG_VR_MODULE_STATUS = 0x00050005
    const val MSG_VR_AUDIO_INTERRUPT = 0x00050006
    const val MSG_VR_AUDIO_DATA_ENCODE = 0x00050007

    // Touch通道相关消息
    const val MSG_TOUCH_ACTION = 0x00068001
    const val MSG_TOUCH_ACTION_DOWN = 0x00068002
    const val MSG_TOUCH_ACTION_UP = 0x00068003
    const val MSG_TOUCH_ACTION_MOVE = 0x00068004
    const val MSG_TOUCH_SINGLE_CLICK = 0x00068005
    const val MSG_TOUCH_DOUBLE_CLICK = 0x00068006
    const val MSG_TOUCH_LONG_PRESS = 0x00068007
    const val MSG_TOUCH_UI_ACTION_SOUND = 0x00060009
    const val MSG_TOUCH_UI_ACTION_BEGIN = 0x0006800A
    const val MSG_TOUCH_ACTION_POINTER_DOWN = 0x0006800B
    const val MSG_TOUCH_ACTION_POINTER_UP = 0x0006800C
    const val MSG_TOUCH_ACTION_OTHER_POINTER_UP = 0x0006800D

    // 新的反控事件service type，不使用protobuf封装了，采用新的格式
    // action   pointerId1 x1       y1        pointerId2 x2       y2        .......
    // 4 bytes  1 byte     2 bytes  2 bytes   1 byte     2 bytes  2 bytes
    const val MSG_TOUCH_ACTION_3 = 0x0006800E

    const val MSG_TOUCH_CAR_HARD_KEY_CODE = 0x00068008
    // 硬按键消息
    const val KEYCODE_HOME = 0x00000001
    const val KEYCODE_PHONE_CALL = 0x00000002
    const val KEYCODE_PHONE_END = 0x00000003
    const val KEYCODE_PHONE_END_MUTE = 0x00000004
    const val KEYCODE_HFP = 0x00000005
    const val KEYCODE_SELECTOR_NEXT = 0x00000006
    const val KEYCODE_SELECTOR_PREVIOUS = 0x00000007
    const val KEYCODE_SETTING = 0x00000008
    const val KEYCODE_MEDIA = 0x00000009
    const val KEYCODE_RADIO = 0x0000000A
    const val KEYCODE_NAV = 0x0000000B
    const val KEYCODE_SRC = 0x0000000C
    const val KEYCODE_MODE = 0x0000000D
    const val KEYCODE_BACK = 0x0000000E
    const val KEYCODE_SEEK_SUB = 0x0000000F
    const val KEYCODE_SEEK_ADD = 0x00000010
    const val KEYCODE_VOLUME_SUB = 0x00000011
    const val KEYCODE_VOLUME_ADD = 0x00000012
    const val KEYCODE_MUTE = 0x00000013
    const val KEYCODE_OK = 0x00000014
    const val KEYCODE_MOVE_LEFT = 0x00000015
    const val KEYCODE_MOVE_RIGHT = 0x00000016
    const val KEYCODE_MOVE_UP = 0x00000017
    const val KEYCODE_MOVE_DOWN = 0x00000018
    const val KEYCODE_MOVE_UP_LEFT = 0x00000019
    const val KEYCODE_MOVE_UP_RIGHT = 0x0000001A
    const val KEYCODE_MOVE_DOWN_LEFT = 0x0000001B
    const val KEYCODE_MOVE_DOWN_RIGHT = 0x0000001C
    const val KEYCODE_TEL = 0x0000001D
    const val KEYCODE_MAIN = 0x0000001E
    const val KEYCODE_MEDIA_START = 0x0000001F
    const val KEYCODE_MEDIA_STOP = 0x00000020
    const val KEYCODE_VR_START = 0x00000021
    const val KEYCODE_VR_STOP = 0x00000022
    const val KEYCODE_NUMBER_0 = 0x00000023
    const val KEYCODE_NUMBER_1 = 0x00000024
    const val KEYCODE_NUMBER_2 = 0x00000025
    const val KEYCODE_NUMBER_3 = 0x00000026
    const val KEYCODE_NUMBER_4 = 0x00000027
    const val KEYCODE_NUMBER_5 = 0x00000028
    const val KEYCODE_NUMBER_6 = 0x00000029
    const val KEYCODE_NUMBER_7 = 0x0000002A
    const val KEYCODE_NUMBER_8 = 0x0000002B
    const val KEYCODE_NUMBER_9 = 0x0000002C
    const val KEYCODE_NUMBER_STAR = 0x0000002D // *

    const val KEYCODE_NUMBER_POUND = 0x0000002E // #

    const val KEYCODE_NUMBER_DEL = 0x0000002F
    const val KEYCODE_NUMBER_CLEAR = 0x00000030
    const val KEYCODE_NUMBER_ADD = 0x00000031 // +

    // 雷克萨斯TouchPad定制消息
    const val MSG_TOUCH_PAD_DOWN = 0x0001005A
    const val MSG_TOUCH_PAD_MOVE = 0x0001005B
    const val MSG_TOUCH_PAD_UP = 0x0001005C
    const val MSG_TOUCH_PAD_PINCH = 0x0001005D
    const val MSG_CMD_FOCUS_CHANGE = 0x0001005E

    // Data通道相关消息 (UPDATE)
    const val MSG_DATA_MD_TRANSFER_START = 0x00070007
    const val MSG_DATA_MD_TRANSFER_SEND = 0x00070008
    const val MSG_DATA_MD_TRANSFER_END = 0x00070009
    const val MSG_DATA_HU_UPDATE_START = 0x0007800A
    const val MSG_DATA_HU_UPDATE_END = 0x0007800B

    const val MSG_CHANNEL_SPECIAL_SETTINGS = 0x01018003 // 有特别定制需求的渠道号，发送此消息，携带渠道号

    // 无线连接，蓝牙通道相关消息
    const val MSG_WIRELESS_INFO_REQUEST = 0x00100001
    const val MSG_WIRELESS_INFO_RESPONSE = 0x00108002
    const val MSG_WIRELESS_TARGET_INFO_REQUEST = 0x00100004
    const val MSG_WIRELESS_TARGET_INFO_RESPONSE = 0x00108005
    const val MSG_WIRELESS_REQUEST_IP = 0x00108006
    const val MSG_WIRELESS_RESPONSE_IP = 0x00100007
    const val MSG_WIRELESS_MD_STATUS = 0x00100008
    const val MSG_WIRELESS_HU_STATUS = 0x00108009

    fun getMsgName(serviceType: Int): String? {
        var msgName: String? = null

        if (serviceType <= 0) {
            return msgName
        }

        var tmpValue: Int
        try {
            val cls: Class<*> = ServiceTypes::class.java
            val fields = cls.fields
            val len = fields.size
            for (i in 0 until len) {
                try {
                    tmpValue = fields[i].getInt(cls)
                    if (tmpValue == serviceType) {
                        msgName = fields[i].name
                        break
                    }
                } catch (ex: Exception) {
                }
            }
        } catch (excep: Exception) {
        }
        return msgName
    }
}